export abstract class Product {

    protected name?: string;

    abstract naming(name: string): void;

    sayHi(): void {
        if (this.name === undefined) {
            throw new Error("错误：产品暂未命名")
        }
        console.log(`${this.name}：你好！`)
    }
}